package com.zmzncs.lmtc.module.promotion.controller;


import com.zmzncs.lmtc.common.pojo.Rest;
import com.zmzncs.lmtc.common.util.RestUtil;
import com.zmzncs.lmtc.module.promotion.service.RechargeRuleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 促销-充值规则 前端控制器
 * </p>
 *
 * @author JD
 * @since 2021-03-04
 */
@Api(tags = "充值规则收费标准")
@RestController
@RequestMapping("/promotion/recharge-rule")
public class RechargeRuleController {

    @Autowired
    RechargeRuleService rechargeRuleService;


    @ApiOperation(value = "查询充值规则")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", name = "token", value = "请求头token", required = true),
    })
    @PostMapping(value = "getRechargeRule")
    public Rest<List<String>> getRechargeRule() {
        List<String> ruleList = rechargeRuleService.getRechargeRule();
        return RestUtil.success(ruleList);
    }
}

